package work6;
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
public class bbb extends HttpServlet  {
    
	public void init (ServletConfig config) throws ServletException
	{
		super.init();
		
	}
	
	
	public void doPost(HttpServletRequest request, HttpServletResponse response) 
	throws IOException , ServletException
	{
		
		response.setContentType("text/html;charset=GB2312");
		PrintWriter out = response.getWriter();
		String str = request.getParameter("number");
   
		StringBuilder sb = new StringBuilder();
		for(int i=0; i<str.length(); i++) {
			if(str.charAt(i)>=48&&str.charAt(i)<=57)
			sb.append(str.charAt(i));
		}
		if(sb.length()==0)
		   out.println("请输入数字");
		else
			out.println(new String(sb));
		
	}

}
